package com.lollipop.ucenter.rpc;

import lombok.extern.slf4j.Slf4j;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

@Slf4j
public class Main {

    public static void main(String[] arg) {
        try {
            ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("classpath:spring-*.xml");
            context.start();
        } catch (Exception e) {
            log.error(">>> Main context start error:", e);
        }

        synchronized (Main.class) {
            while (true) {
                try {
                    Main.class.wait();
                } catch (InterruptedException e) {
                    log.error(">>> Main synchronized error:", e);
                }
            }
        }
    }
}
